﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

using ServicesComponent.Repositories.Core;
using Business_Objects;
using Data_Objects;
namespace ServicesComponent.Repositories
{
    ///// <summary>
    ///// MauSuatAnChiTiet Repository. Good example of CRUD operations.
    ///// </summary>
    public class MauSuatAnChiTietRepository : IMauSuatAnChiTietRepository
    {
        private static readonly IMauSuatAnChiTietDao _mauSuatAnChiTiet = DataAccess.MauSuatAnChiTietDao;
        public List<MauSuatAnChiTiet> GetList()
        {
            return _mauSuatAnChiTiet.GetMauSuatAnChiTiet().ToList();
        }

        public MauSuatAnChiTiet Get(string id)
        {
            return _mauSuatAnChiTiet.GetMauSuatAnChiTietByID(id);
        }

        public void Insert(MauSuatAnChiTiet t)
        {
            _mauSuatAnChiTiet.InsertMauSuatAnChiTiet(t);
        }

        public void Update(MauSuatAnChiTiet t)
        {
            _mauSuatAnChiTiet.UpdateMauSuatAnChiTiet(t);
        }

        public void Delete(MauSuatAnChiTiet t)
        {
            _mauSuatAnChiTiet.DeleteMauSuatAnChiTiet(t);
        }
    }
}